﻿using System;
using System.Windows.Forms;

public class Class1
{
	public void FormatDataGrid(DataGridView dgv)
	{
        dgv.AllowUserToAddRows = false;
        dgv.AllowUserToDeleteRows = false;
        dgv.ReadOnly = true;
        dgv.RowHeadersVisible = false;
        dgv.AllowUserToResizeRows = false;
        dgv.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.Gray;
        dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        dgv.BackgroundColor = System.Drawing.Color.White;
        dgv.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
        dgv.GridColor = System.Drawing.Color.Gray;
        dgv.BorderStyle = BorderStyle.None;
  	}

}
